package cn.core.sign.mapper;

import cn.core.sign.eo.Org;
import cn.core.sign.vo.StaffPostListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;

/**
 * 登录 mybatis 持久化接口
 */
@Mapper
public interface SignMapper {

  /**
   * 用户Id 登录端 >>> 授权列表
   */
  public Collection<String> getAuthListByUsrIdLoginSide(@Param("usrId") String usrId, @Param("loginSide") String loginSide) throws Exception;

  /**
   * 岗位Id 登录端 >>> 授权列表
   */
  public Collection<String> getAuthListByPostIdLoginSide(@Param("postId") String postId, @Param("loginSide") String loginSide) throws Exception;

  /**
   * 员工Id 登录端 >>> 授权列表
   */
  public Collection<String> getAuthListByStaffIdLoginSide(@Param("staffId") String staffId, @Param("loginSide") String loginSide) throws Exception;

  /**
   * 员工Id >>> 员工岗位列表
   */
  public Collection<StaffPostListVO> getStaffPostListByStaffId(@Param("staffId") String staffId) throws Exception;

  /**
   * 员工Id >>> 当前组织机构信息
   */
  public Org getCurrentOrgInfoByStaffId(@Param("staffId") String staffId) throws Exception;

  /**
   * 岗位Id >>> 当前组织机构信息
   */
  public Org getCurrentOrgInfoByPostId(@Param("postId") String postId) throws Exception;

  /**
   * 组织机构Ids 指定组织机构级别 >>> 指定级别组织机构信息
   */
  public Collection<Org> getAssignOrgLevelOrgInfoByOrgIdsAssignOrgLevel(@Param("orgIds") Collection<String> orgIds, @Param("assignOrgLevel") String assignOrgLevel) throws Exception;

}
